package jyj.springmvc.learning.service.impl;

import jyj.springmvc.learning.dao.ProductDao;
import jyj.springmvc.learning.entity.Product;
import jyj.springmvc.learning.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author 老顽固小可爱
 * @Date 2022/12/12 11:04
 * @Version 1.0
 */
@Service("productService")
public class ProductServiceImpl implements ProductService {
    @Autowired
    private ProductDao productDao;

    @Override
    public List<Product> getProductList() {
        return productDao.getProductList();
    }

    @Override
    public Product getProductById(Integer productId) {
        return productDao.getProductById(productId);
    }
}
